<template>
    <div id="warn" :style="{'backgroundColor':bgc,'border':'1px solid'+borderColor}" v-if="isshowwar">
        <div class="left-content">
            <i class="el-icon-info" :style="{'color':iconcolo}"></i>
            <span class="content-text">{{content}}</span>
        </div>
        <i class="el-icon-close" @click="delclose"></i>
    </div>
</template>

<script>
export default {
    data(){
        return {
            //是否显示
            isshowwar:true
        }
    },
    props:{
        //图标
        iconpath:{
            type:String,
            default:''
        },
        //内容
        content:{
            type:String,
            default:'11111',
            required:true
        },
        //背景颜色
        bgc:{
            type:String,
            default:'#ccc'
        },
        //是否可关闭
        closable:{
            type:Boolean,
            default:false
        },
        //图标的颜色
        iconcolo:{
            type:String,
            default:'#ccc'
        },
        //边框的颜色
        borderColor:{
            type:String,
            default:'#ccc'
        }
        
    },
    methods:{
        delclose(){
            console.log(999)
            this.isshowwar = false
        }
    }
}
</script>

<style scoped lang='scss'>
#warn{
    padding: 12px 15px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .content-text{
        color: #555;
        font-size: 13px;
    }
    i{
        cursor: pointer;
        color: #999;
    }
    .left-content{
        i{
            font-size: 16px;
            margin-right: 6px;
        }
    }
}
</style>